package com.cysyz.web.modules.base.permission.domain;


import com.cysyz.mylib.domain.BaseEntity;
import com.cysyz.web.modules.base.user.domain.SysUser;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SysUserRole entity. @author MyEclipse Persistence Tools
 */
@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table(name = "FNM_SYS_USER_ROLE")
public class SysUserRole extends BaseEntity {

	// Fields

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID", nullable = false, updatable = false)
	private SysUser sysUser;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SYSROLE_ID", nullable = false, updatable = false)
	private SysRole sysRole;

	// Constructors

	/** default constructor */
	public SysUserRole() {
	}



	public SysUser getSysUser() {
		return this.sysUser;
	}

	public void setSysUser(SysUser sysUser) {
		this.sysUser = sysUser;
	}

	public SysRole getSysRole() {
		return this.sysRole;
	}

	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}

}